 <!DOCTYPE html>
 <html>

 <head>
     <meta charset="utf-8">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <title>-导航管理</title>
     <meta name="keywords" content="">
     <meta name="description" content="">
     <link rel="shortcut icon" href="/favicon.ico">
     <link href="/static/admin/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
     <link href="/static/admin/css/font-awesome.css?v=4.4.0" rel="stylesheet">
     <link href="/static/admin/css/plugins/iCheck/custom.css" rel="stylesheet">
     <link href="/static/admin/css/animate.css" rel="stylesheet">
     <link href="/static/admin/css/style.css?v=4.1.0" rel="stylesheet">
     <link href="/static/admin/css/plugins/switchery/switchery.css" rel="stylesheet">
     <link href="/static/admin/css/plugins/footable/footable.core.css" rel="stylesheet">
     <link href="/static/admin/css/student/student.css" rel="stylesheet">
     <link href="/static/admin/layui/css/layui.css" rel="stylesheet">
     <link href="/static/admin/css/plugins/datapicker/datepicker3.css" rel="stylesheet">
   
     <style>
         html,body{
             height: none;
         }
         .zyc {
             display: none;
             margin: 10px 10px;
         }
         .zyc input{
            width: 130px;
            height: 100%;
            display: inline-block;
            font-weight: bold;
            text-align: center;
            letter-spacing: 0.3em;
         }
         .zyc textarea{
            border-color: #cfdadd;
            border-radius: 2px;
         }
         .zyc img{
            display: inline-block;
            width: 100px;
            margin-top: -4px;
            border-radius: 2px;
            border: 1px #cfdadd solid;
         }
         .zyc select {
            padding: 0px 12px;
         }
         #zycsubmit{
            display: block;
            margin-top: 10px;
            border-radius: 2px;
         }
         
     </style>

 </head>

 <body class="gray-bg">
     <div class="wrapper wrapper-content animated " style="padding: 0;">
         <div class="row">
             <div class="col-sm-12">
                 <div class="ibox float-e-margins">
                     <div class="ibox-title">
                         <h5>资源 {notempty name="u['username']"} - {$u['username']} {/notempty}</h5>

                     </div>
                     <div class="ibox-content">
                         <div class="row">
                             <div class="col-sm-12">
                                <div class="input-group">
                                    <div class="form-group" id="data_5">
                                        <form action="" method="GET" id="filterByTime">
                                            <div class="input-daterange input-group" id="datepicker">
                                                <input type="text" class="input-sm form-control" name="start" autocomplete="false" value="{php}echo date('Y-m-d', time()) {/php}" />
                                                <span class="input-group-addon">到</span>
                                                <input type="text" class="input-sm form-control" name="end" autocomplete="false" value="{php}echo date('Y-m-d', time()) {/php}" />
                                                <a type="submit" class="input-group-addon" style="background-color:#7266ba;color:#fff" onclick="$('#filterByTime').submit()">筛选</a>
                                            </div>
                                        </form>
                                    </div>
                                    <!-- <input type="text" placeholder="请输入关键词" class="input-sm form-control"><span class="input-group-btn"> -->
                                    
                                </div>
                             </div>
                         </div>
                         <div class="table-responsive">

                             <table class="footable table table-stripped toggle-arrow-tiny" data-page-size="10">
                                 <thead>
                                     <tr>
                                         <th data-toggle="true">编号</th>
                                         <th>学员/咨询人名称</th>
                                         <th>邮箱</th>
                                         <th>咨询顾问</th>
                                         <th>学生电话</th>
                                         <th>咨询人电话</th>
                                         <th>咨询人与学生的关系</th>
                                         <th>来源</th>
                                         <th>接待员</th>
                                         <th>学生分类</th>
                                         <th>操作</th>

                                         <th data-hide="all"></th>

                                     </tr>
                                 </thead>

                                 <tbody class="footable-tbody-hide">
                                 {foreach name="res" item="vo"}
                                 
                                 <tr>
                                     <td>{$vo.sid}</td>
                                     <td>{$vo.sname}</td>
                                     <td>{$vo.semai}</td>
                                     <td>{$vo.zxsname}</td>
                                     <td>{$vo.stel}</td>
                                     <td>{$vo.zxr_tel}</td>
                                     <td>{$vo.rapport}</td>
                                     <td>{$vo.infosource}</td>
                                     <td>{$vo.receptionist}</td>
                                     <td>
                                        {if condition = '$vo.sstatus == 2'}
                                            {if condition = '$vo.contract_rate == -1'}
                                                未跟进
                                            {else /}
                                                <font size="2" color="{$status_config[$vo.sstatus]['color']}">{$contract_rate_select[$vo.contract_rate]['name']}
                                                </font>
                                            {/if}
                                        {else/}
                                                <font size="2" color="{$status_config[$vo.sstatus]['color']}">{$status_config[$vo.sstatus]['name']}</font>
                                        {/if}
                                     </td>

                                     <td class="tools">
                                        {if condition='in_array(3,$ra)'}
                                        <a href="{:url('Student/update')}?id={$vo.sid}" class="editInfo"><i class="glyphicon glyphicon-pencil"
                                                style="color:#19a9d5"></i></a>
                                        {/if}
                                        &nbsp; <a class="signing" id="signing" href="{:url('Signing/index')}?id={$vo.sid}" data-id="{$vo.sid}"><i class="fa fa-edit"
                                                style="color:#19a9d5"></i></a>
                                        
                                        &nbsp; <a class="transfer" id="transfer" data-id="{$vo.sid}" zxsid='{$vo.consultant}'> <i class="fa fa-random"
                                                style="color:#19a9d5"> </i></a>
                                        
                                        
                                        {if condition='in_array(2,$ra)'}
                                        &nbsp; <a class="del" data-id="{$vo.sid}"><i class="glyphicon glyphicon-trash" style="color:#19a9d5"></i></a>
                                        {/if}
                                    </td>
                                     
                                     <td>
                                         <!-- 以下是折叠部分 -->
                                         <div style="padding: 10px;background: #f2f2f2;" class="table-hide-div">
                                             <table style="width: 100%;" class="info-table">
                                                 <tbody>

                                                     <tr colspan='10' class="info-table-line">
                                                         <td class="info-table-row info-table-row-name">
                                                             当前进度:
                                                         </td>
                                                         <td class="info-table-row info-table-row-val">
                                                             {$vo.schedule}
                                                         </td>
                                                         <td class="info-table-row info-table-row-name">
                                                             下次回访时间:
                                                         </td>
                                                         <td class="info-table-row info-table-row-val">
                                                             {$vo.returnvisit_time}
                                                         </td>
                                                         <td class="info-table-row info-table-row-name">
                                                             状态定义日期:
                                                         </td>
                                                         <td class="info-table-row info-table-row-val">
                                                             {$vo.status_time}
                                                         </td>
                                                     </tr>
                                                     <tr colspan='10' class="info-table-line">
                                                         <td class="info-table-row info-table-row-name">
                                                             出生年月:
                                                         </td>
                                                         <td class="info-table-row info-table-row-val">
                                                             {$vo.birthday}
                                                         </td>
                                                         <td class="info-table-row info-table-row-name">
                                                             毕业时间:
                                                         </td>
                                                         <td class="info-table-row info-table-row-val">
                                                             {$vo.graduation_time}
                                                         </td>
                                                         <td class="info-table-row info-table-row-name">
                                                             学生分类:
                                                         </td>
                                                         <td class="info-table-row info-table-row-val">
                                                             {$vo.student_class}
                                                         </td>
                                                     </tr>
                                                     <tr colspan='10' class="info-table-line">
                                                         <td class="info-table-row info-table-row-name">
                                                             文化程度:
                                                         </td>
                                                         <td class="info-table-row info-table-row-val">
                                                            {volist name="education_select" id='voedu'}
                                                                {if condition="$voedu.id===$vo.education"} {$voedu.name} {/if}
                                                            {/volist}
                                                        </td>
                                                         <td class="info-table-row info-table-row-name">
                                                             毕业学校:
                                                         </td>
                                                         <td class="info-table-row info-table-row-val">
                                                             {$vo.graduation_school}
                                                         </td>
                                                         <td class="info-table-row info-table-row-name">
                                                             所学专业:
                                                         </td>
                                                         <td class="info-table-row info-table-row-val">
                                                             {$vo.degree}
                                                         </td>
                                                     </tr>
                                                     <tr colspan='10' class="info-table-line">
                                                         <td class="info-table-row info-table-row-name">
                                                             目标学历:
                                                         </td>
                                                         <td class="info-table-row info-table-row-val">
                                                             {$vo.target_education}
                                                         </td>
                                                         <td class="info-table-row info-table-row-name">
                                                             在读学校:
                                                         </td>
                                                         <td class="info-table-row info-table-row-val">
                                                             {$vo.current_school}
                                                         </td>
                                                         <td class="info-table-row info-table-row-name">
                                                             高考英语成绩:
                                                         </td>
                                                         <td class="info-table-row info-table-row-val">
                                                             {$vo.english_scores}
                                                         </td>
                                                     </tr>
                                                     <tr colspan='10' class="info-table-line">
                                                         <td class="info-table-row info-table-row-name">
                                                             签约情况:
                                                         </td>
                                                         <td class="info-table-row info-table-row-val">
                                                             {eq name='$vo.sstatus' value='1'}
                                                                已签约
                                                             {else/}
                                                                未签约
                                                             {/eq}
                                                         </td>
                                                         <td class="info-table-row info-table-row-name">
                                                             学生联系方式:
                                                         </td>
                                                         <td class="info-table-row info-table-row-val">
                                                             {$vo.stel}
                                                         </td>
                                                         <td class="info-table-row info-table-row-name">
                                                             在读年级:
                                                         </td>
                                                         <td class="info-table-row info-table-row-val">
                                                             {$vo.current_grade}
                                                         </td>
                                                     </tr>
                                                     <tr colspan='10' class="info-table-line">
                                                         <td class="info-table-row info-table-row-name">
                                                             婚否:
                                                         </td>
                                                         <td class="info-table-row info-table-row-val">
                                                             {eq name="vo['married']" value="1"}
                                                                    是 
                                                             {else/} 
                                                                    否
                                                             {/eq}
                                                         </td>
                                                         <td class="info-table-row info-table-row-name">
                                                             外语水平:
                                                         </td>
                                                         <td class="info-table-row info-table-row-val">
                                                             {$vo.english_Level}
                                                         </td>
                                                         <td class="info-table-row info-table-row-name">
                                                             介绍给中介:
                                                         </td>
                                                         <td class="info-table-row info-table-row-val">
                                                             {$vo.agent}
                                                         </td>
                                                     </tr>
                                                     <tr colspan='10' class="info-table-line">
                                                         <td class="info-table-row info-table-row-name">
                                                             性别:
                                                         </td>
                                                         <td class="info-table-row info-table-row-val">
                                                             {eq name="vo['ssex']" value="1"}
                                                                    男 
                                                             {else/} 
                                                                    女
                                                             {/eq}
                                                         </td>
                                                         <td class="info-table-row info-table-row-name">
                                                             是否参加雅思考试:
                                                         </td>
                                                         <td class="info-table-row info-table-row-val">
                                                             
                                                             {eq name="vo['ielts_test']" value="1"}
                                                                    是 
                                                             {else/} 
                                                                    否
                                                             {/eq}
                                                         </td>
                                                         <td class="info-table-row info-table-row-name">
                                                             留学国家:
                                                         </td>
                                                         <td class="info-table-row info-table-row-val">
                                                             {$vo.study_abroad_country}
                                                         </td>
                                                     </tr>
                                                     <tr colspan='10' class="info-table-line">
                                                         <td class="info-table-row info-table-row-name">
                                                             微信/QQ:
                                                         </td>
                                                         <td class="info-table-row info-table-row-val">
                                                             {$vo.wechatqq}
                                                         </td>
                                                         <td class="info-table-row info-table-row-name">
                                                             详细地址:
                                                         </td>
                                                         <td class="info-table-row info-table-row-val">
                                                            {$vo.province}
                                                            {$vo.city}
                                                            {$vo.county}
                                                            {$vo.sadd}
                                                         </td>
                                                         <td class="info-table-row info-table-row-name">
                                                             留学城市:
                                                         </td>
                                                         <td class="info-table-row info-table-row-val">
                                                             {$vo.study_abroad_city}
                                                         </td>
                                                     </tr>
                                                     <tr colspan='10' class="info-table-line">
                                                         <td class="info-table-row info-table-row-name">
                                                             备注信息:
                                                         </td>
                                                         <td colspan='10' class="info-table-row info-table-row-val">
                                                             {$vo.remarks}
                                                         </td>
                                                     </tr>
                                                    <tr colspan='10' class="info-table-line">
                                                        <td class="info-table-row info-table-row-name">
                                                            咨询日志:
                                                        </td>
                                                        <td colspan='10' class="info-table-row info-table-row-val">
                                                            {foreach $vo.oldzxlog as $log}
                                                            <div class="log">
                                                                <span class="time">{$log.create_time|date='Y年m月d日',###}</span>
                                                                <span class="operator">{$log.username}</span>
                                                                <span class="content">{$log.content}</span>
                                                            </div>
                                                            {/foreach}
                                                        </td>
                                                    </tr>
                                                 </tbody>
                                             </table>
                                         </div>
                                         <!-- 以下是折叠部分 end -->
                                     </td>
                                 </tr>
                                 
                                 {/foreach}
                                </tbody>
                                 <tfoot>
                                        <tr style="display:none">
                                                <td >
                                                    <ul class="pagination pull-right"></ul>
                                                </td>
                                        </tr>
                                 </tfoot>
                             </table>

                         </div>
                         <div class="pagebar">{$res->render()}</div>
                         
                     </div>
                 </div>
             </div>

         </div>
     </div>

    <!-- 转回资源池 弹窗-->
    <div class="zyc" id="zyc">
        <select class="form-control m-b" name="zxsid">
            <option value="-1">资源池</option>
            {volist name='zxs' id='vo'}
            <option value="{$vo.id}">{$vo.username}</option>
            {/volist}
        </select>
        <textarea style="width: 100%" id="logtext" class="str-check" rows="4" cols="" placeholder="请填写转移原因"
            autocomplete="off"></textarea><br>
        <input type="text" class="form-control" name="yzm" id="yzmstr" placeholder="请输入验证码" autocomplete="off">
        <img id='yzmImg' onclick="this.src='{:captcha_src()}?'+Math.random()" src="{:captcha_src()}" alt="captcha" />
        <a href="javascript:;" id='zycsubmit' data-id='' class="btn btn-primary">确认转移</a>
    </div>
     
     <!-- 全局js -->
     
     <script src="/static/admin/js/jquery.min.js?v=2.1.4"></script>
     <script src="/static/admin/js/bootstrap.min.js?v=3.3.6"></script>
     <script src="/static/admin/js/content.js"></script>
     <!-- Peity -->
     <script src="/static/admin/js/plugins/peity/jquery.peity.min.js"></script>
     <!-- layui -->
     <script src="/static/admin/layui/layui.js"></script>
     <!-- foottable -->
     <script src="/static/admin/js/plugins/footable/footable.all.min.js"></script>
     <!-- Data picker -->
     <script src="/static/admin/js/plugins/datapicker/bootstrap-datepicker.js"></script>
     <script src="/static/admin/js/counselors/showres.js"></script>
     
     <script>

        
        var ajaxUrl = {
            'checkyzm':"{:url('Counselors/checkyzm')}",
            'transfer':"{:url('Counselors/transfer')}",
            'update'  :"{:url('Student/update')}?id=",
            'bindenroll' : "{:url('Signing/bindenroll')}?sid=",
            'captcha_src': '{:captcha_src()}?',
        };
         layui.use(['layer','element'], function () { //独立版的layer无需执行这一句
            var $ = layui.jquery,
                 layer = layui.layer; //独立版的layer无需执行这一句
            var element = layui.element;
             //点击提交
             $(".del").click(function () {
                 var s = $(this);
                 var ids = $(this).attr('data-id');

                 ///alert(ids);
                 var que = window.confirm("确定要删除吗");
                 if(que){
                    $.post("{:url('Student/delete')}", {
                        id: ids
                    }, function (msg) {

                        if (msg == 1) {
                            alert("删除成功");
                            s.parents("tr").remove();
                        } else {
                            alert("删除失败");
                        }
                    })

                 }
      
             });

         });

        $(document).ready(function () {
            //给每一个分页按钮的 href属性添加 key 和 id 参数
            $('.pagebar li a').each(function () {
                var oldHref = $(this).attr('href');
                var newHref = oldHref + "&key={$oldkey}&id={$id}";
                $(this).attr('href', newHref);
            });

        });


         window.onload = function () {
            $('#data_5 .input-daterange').datepicker({
                keyboardNavigation: false,
                forceParse: false,
                autoclose: true
            });
             $('.footable-tbody-hide').css('visibility','visible')
         }

     </script>
 </body>

 </html>